package cn.com.baozun.sany.workbench.application.listener;

import cn.com.baozun.sany.workbench.online.manager.entity.OnlineChange;
import cn.com.baozun.sany.workbench.application.event.OnlineChangeEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @title: StatisticsListener
 * @description:
 * @author: guan.xin
 * @create: 2021-05-26 19:56
 * @since: JDK8
 */
@Component
public class StatisticsListener {

    @EventListener
    public void statistics(OnlineChangeEvent onlineChangeEvent) {
        // 获取对象
        OnlineChange oc = onlineChangeEvent.getOnlineChange();

        //输出注册用户信息
        System.out.println(String.format("statistics注册信息，StaffId：%s,PreStatus：%s", oc.getStaffId(), oc.getPreStatus()));
    }
}
